<?php
namespace app\admin\controller;
use think\Controller;
/**
* 商户配置
*/
class Article extends Controller
{
	public function article_list(){
		$xx = db('conten')->order('id desc')->select();
		$this->assign('xx',$xx);
		return view();
	}

	public function article_add(){
		return view();
	}
	
	public function article_add_ad(){
		$data = array(
			'title' => input('post.title'),
			'zuoze' => input('post.zuoze'),
			'conte' => htmlspecialchars_decode(input('post.conte')),
			'time' => date('Y-m-d H:i:s')
		);
		$ad = db('conten')->insert($data);
		if($ad == 1){
			$this->success('添加文章成功',url('Article/article_list'));
		}else{
			$this->error('添加文章失败',url('Article/article_list'));
		}
		
		
	}

	
}
